Posts Tagged “spring boot”
-
Exposing Spring Actuator endpoints via Jersey
Transparency makes the difference between a system that improves over time in production and one that stagnates on decays.[1]
Spring Boot comes with a number of production ready endpoints that expose information about your application’s configuration and health. This insight is vital for monitoring. By default Spring Actuator functionality is accessible via Spring MVC. This is not ideal when you use Jersey (JAX-RS) as your primary web service framework. In fact, if you use Spring Boot’s Jersey Starter sample project, the endpoints don’t even work out of the box (see Issue #2025). In this post, I’m going to demonstrate how to expose the Actuator endpoints via Jersey.
-
Catch-all error handling for web services with RxClient and Spring Boot
One of Spring Boot’s many sample projects demonstrates how to configure Spring with Jersey. We’re using the JAX-RS API a lot in projects for developing of RESTful web services. It was designed for this specific task from the beginning, rather than retrofitted like Spring MVC was. Jersey also offers a reactive client API which supports a reactive programming model.
In this post I’m going to show how to use the the reactive Jersey client based on RxJava together with Spring Boot. This post will also address how to handle and communicate server side errors back to the client. Specifically there are some issues I’ve discovered which are related to using the reactive Jersey client together with the embedded Tomcat container.